package edu.hawaii.duedates.libraries;

import edu.hawaii.duedates.datastore.ResultsList;

/**
 * A basic, incomplete implementation of the ILibrary interface. 
 * 
 * @author Arthur Shum and Erin Kim.
 */
public abstract class Library implements ILibrary {
  
  private static final long serialVersionUID = 1L;

  protected String username;
  protected String password;

  /**
   * Retrieves information about a patron's checked out library items by logging in to this 
   * library's website using the patron's username and password.
   * 
   * @return A ResultsList containing information about checked-out items.
   * @throws Exception If an error occurs while retrieving info.
   */
  public abstract ResultsList getInfo() throws Exception;
  
  /**
   * Returns the library's name.
   * 
   * @return The library's name.
   */
  public abstract String getName();
  
  /**
   * Returns the user's name.
   * 
   * @return The user's name.
   */
  public String getUsername() {
    return username;
  }

  /**
   * Returns the user's password.
   * 
   * @return The user's password.
   */
  public String getPassword() {
    return password;
  }

  /**
   * Set the user's name.
   * 
   * @param username The name to set the user's name to. 
   */
  public void setUsername(String username) {
    this.username = username;
  }
    
  /**
   * Sets the user's password.
   * 
   * @param password The password to set the user's password to.
   */
  public void setPassword(String password) {
    this.password = password;
  }
  
}
